home *** CD-ROM | disk | FTP | other *** search
- /*
- * L-system for bouncing ball animation. A sphere is
- * bounced at the hull (the hull consists of 6 planes,
- * forming a box).
- *
- * Start bouncingball script to get the animation.
- *
- * Copyright (C) 1992, Christoph Streit (strei@iam.unibe.ch)
- * All rights reserved.
- */
-
- lsystem BouncingBall;
-
- hull cube {
- plane 0 0 0 0 0 1
- plane 0 0 10 0 0 1
- plane 5 0 0 1 0 0
- plane -5 0 0 1 0 0
- plane 0 5 0 0 1 0
- plane 0 -5 0 0 1 0
- };
-
- table bounce {
- G(l) -> G(l+1);
- };
-
- attributes {
- axiom pt(20) ro(30) tu(30)
- ah("cube")
- co ("red") G(1) s(1);
- derivation bounce(iter);
-
- sphereres 6;
- eye 25, 0, 5;
- lookat 0, 0, 5;
- };